﻿using System;

namespace Microsoft.Popfly.GameCreator.GameEngine.Events
{
    public class CollisionEventArgs : PGCEventArgs
    {
        [Obsolete("Please use Actor1 instead")]
        public string actor1 { get { return Actor1.Name; } }
        [Obsolete("PleaseUse Actor2 instead")]
        public string actor2 { get { return Actor2.Name; } }
        [Obsolete("Please use Actor1Direction instead")]
        public CollisionDirectionArg actor1Direction { get { return Actor1Direction; } }
        [Obsolete("Please use Actor2Direction instead.")]
        public CollisionDirectionArg actor2Direction { get { return Actor2Direction; } }

        public Actor Actor1 { get; private set; }
        public Actor Actor2 { get; private set; }

        public CollisionDirectionArg Actor1Direction { get; private set; }
        public CollisionDirectionArg Actor2Direction { get; private set; }

        public CollisionEventArgs(
            Actor firstCollider, 
            Actor secondCollider, 
            CollisionDirectionArg actor1CollisionDirection,
            CollisionDirectionArg actor2CollisionDirection
            )
        {
            Actor1 = firstCollider;
            Actor2 = secondCollider;
            Actor1Direction = actor1CollisionDirection;
            Actor2Direction = actor2CollisionDirection;
        }
    }
}
